Many applications including graphics and video displays require that graphic data be scaled from lower resolution modes to a higher resolution mode. For example, the lower resolution mode may be dictated by a graphics controller, perhaps a VGA resolution controller. The higher resolution may be the native resolution of supported video display devices, for example SVGA, XGA, SXGA, SXGA+, UXGA.
In addition, many computer users desire to display video within a display window. Fitting the video to be displayed within the window can require scaling the video source up or down. A simple form of up-scaling is to duplicate pixels in the video image, for example sampling and duplicating m out of every n pixels. However this somewhat simplistic approach of pixel duplication can introduce undesirable visual artifacts, and is not widely used.
Linear interpolation is used in the prior art to improve somewhat the quality of scaled video images. Using so-called bilinear interpolation, when an output sample (e.g., pixel location) falls between two input samples (horizontally or (vertically), the output sample is computed by linearly interpolating between the two samples. Bilinear interpolation operates by calculating the distance-weighted average of the four neighboring pixels linearly, relative to the output pixel location:PO=(1−dy)·[(1−dx)·P+dx·PH]+dy·[(1−dx)·PV+dx·PHV]where PO is the amplitude of the output pixel, where P, PH, PV, PHV are the amplitudes of the four neighboring pixels of PO, and where distances from P to PH, from P to PV, from PH to PHV, from PV to PHV are normalized to one. The normalized distances from P to PO are shown as dx, dy in FIG. 1.
But even bilinear interpolation can cause undesirable visual artifacts, depending on the content of the displayed image. For example, graphics images containing text should have sharper edges than images of moving pictures. Nonetheless, bilinear interpolation applies equal edge enhancement to all images regardless of content. Thus, while bilinear interpolation may improve the display quality of up-scaled video images, less improvement may be apparent for images containing text.
Thus there is a need for a method and system to enhance quality of upscaled images, including text images.
The present invention provides such a method and system for implementing the method.